#ifndef INPUT_H
#define INPUT_H

#include <Windows.h>
#include <process.h>

struct Key
{
	Key() : down(false) {};
	bool down;
};

class Input
{
public:
	Input(){};
	Input(const Input&){};
	~Input(){};

	static bool Init();
	static void ClearKeys();
	static void RawKeyInput(RAWKEYBOARD& kb);
	static void RawMouseInput(RAWMOUSE& mouse);

	static bool KeyDown(char _keyCode);
	static bool KeyPressed(char _keyCode);
	static bool KeyReleased(char _keyCode);

	static void Update();

	static POINT cursorPosition;
	static POINT cursorRelPos;

private:
	static Key keys[256];
	static Key prevKeys[256];
	static CRITICAL_SECTION criticalSection;
};

#endif